Conversation
…k.api.nodejs into feat/affected-users-chart
There was a problem hiding this comment.
Pull request overview
This PR adds a new GraphQL resolver to retrieve chart data for affected users over a specified time period. The implementation follows the existing pattern for the chartData resolver and extends the shared findChartData method to support aggregating different fields.
Changes:
- Added
affectedUsersChartDataGraphQL field to Event type with parameters for days and timezone offset - Implemented resolver that calls a new factory method
getEventDailyAffectedUsersChart - Extended
findChartDatamethod to accept avalueFieldparameter supporting both 'count' and 'affectedUsers' - Added formatting improvements (blank lines) to SAML controller for consistency
- Bumped package version from 1.3.1 to 1.3.2
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/typeDefs/event.ts | Added GraphQL schema definition for affectedUsersChartData field with documentation |
| src/resolvers/event.js | Implemented resolver that retrieves affected users chart data using events factory |
| src/models/eventsFactory.js | Added getEventDailyAffectedUsersChart method and made findChartData more flexible to support different aggregation fields |
| src/sso/saml/controller.ts | Added blank lines before log statements for improved code formatting |
| package.json | Incremented version to 1.3.2 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
|
|
||
| /** | ||
| * Return chart data for affected users of target event occured in last few days |
There was a problem hiding this comment.
The JSDoc comment has a typo: "occured" should be "occurred".
| * | ||
| * @param {string} projectId - event's project | ||
| * @param {string} groupHash - event's groupHash | ||
| * @param {number} days - how many days we need to fetch for displaying in a charts |
There was a problem hiding this comment.
The JSDoc comment contains a grammatical error: "displaying in a charts" should be "displaying in a chart" (or "displaying in charts").
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
added graphql resolver for affected users chart data